<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>

<body>
    react特点
    1.声明式
    2.组件化
    3.一次学习，随处编写
    4.高效（虚拟DOM）
    5.灵活
    6.jsx
    7.单向响应数据流
    <div id="app"></div>
    <script type="text/babel">
        // ReactDOM.render(
        //     <h1>Hello, world!</h1>,
        //     document.getElementById('root')
        // );
        function home() {
            const state = {
                name: "路费",
                age: 18
            }
            ReactDOM.reder(
                <div>
                    <h1>我是海贼王</h1>
                    <button>点击</button>
                    <p>{Math.random() * 10}</p>
                    <p>{state.name}</p>
                </div>,
                document.getElementById("app")
            )
            handleClick(){
                console.log(`{this.state.name,你好}`);
            }
        }

        ReactDOM.render(<Home />, document.getElementById("app"))

    </script>
</body>

</html>